package com.jxc.jxc01.hch.entity;

import java.util.Objects;

public class User {
    private int id;
    private int departmentid;
    private String username;
    private String password;
    private String name;
    private String sex;
    private String email;
    private String phone;
    private String state;
    private String creationtime;
    private String authority;

    public User() {
    }

    public User(int id, int departmentid, String username, String password, String name, String sex, String email, String phone, String state, String creationtime, String authority) {
        this.id = id;
        this.departmentid = departmentid;
        this.username = username;
        this.password = password;
        this.name = name;
        this.sex = sex;
        this.email = email;
        this.phone = phone;
        this.state = state;
        this.creationtime = creationtime;
        this.authority = authority;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getDepartmentid() {
        return departmentid;
    }

    public void setDepartmentid(int departmentid) {
        this.departmentid = departmentid;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getCreationtime() {
        return creationtime;
    }

    public void setCreationtime(String creationtime) {
        this.creationtime = creationtime;
    }

    public String getAuthority() {
        return authority;
    }

    public void setAuthority(String authority) {
        this.authority = authority;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        User user = (User) o;
        return id == user.id && departmentid == user.departmentid && Objects.equals(username, user.username) && Objects.equals(password, user.password) && Objects.equals(name, user.name) && Objects.equals(sex, user.sex) && Objects.equals(email, user.email) && Objects.equals(phone, user.phone) && Objects.equals(state, user.state) && Objects.equals(creationtime, user.creationtime) && Objects.equals(authority, user.authority);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, departmentid, username, password, name, sex, email, phone, state, creationtime, authority);
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", departmentid=" + departmentid +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", name='" + name + '\'' +
                ", sex='" + sex + '\'' +
                ", email='" + email + '\'' +
                ", phone='" + phone + '\'' +
                ", state='" + state + '\'' +
                ", creationtime='" + creationtime + '\'' +
                ", authority='" + authority + '\'' +
                '}';
    }
}
